<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
         <input type="text" v-on:keyup.enter="handle">

         <input v-model="pass" type="password" >

         <div @keyup.delete="pass=''" >
            hello world
         </div>
    </div>
</body>
<script>
var vm = new Vue({
    el: "#app",
    data:{
        pass:'123456'
    },
    methods:{
        handle(){
            console.log('处理....');
        }
    }
});
</script>
</html>